﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace NinjaToolbox.PhysicsSystem
{
    public class PhysicsBase : MonoBehaviour
    {
        [SerializeField]
        PhysicsSystem_LayerConstInfo mLayerConstInfo;

        [SerializeField, Range(0, 31)]
        int mLayer;

        [SerializeField]
        PhysicsShapeContainer mPhysicsShapeContainer = new PhysicsShapeContainer();

        public virtual IPhysicsShape PhysicsShape { get { mPhysicsShapeContainer.GetPhysicsShape().Matrix = transform.localToWorldMatrix; return mPhysicsShapeContainer.GetPhysicsShape(); } }
        public virtual PhysicsShapeContainer PhysicsShapeContainer { get { return mPhysicsShapeContainer; } }

        public virtual int Layer { get { return mLayer; } set { mLayer = value; } }
    }
}
